<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
    <list></list>
    </div>
    <script src="../js/vue.js"></script>
    <script>
        const list ={
            props:["list"],
            item:"",
            template:`
    <ul>
        <li>
            <button @click="getdate">现在的时间</button>
        </li>
    </ul>`,
    data(){
        return{
            time:0
        }
    },
    methods:{
        getdate(){
            alert("现在的时间是"+new Date().toLocaleString())
        }
    }
        }
        const app = new Vue({
            el:"#app",
            data:{
                arr:['1','2','3']
            },
            components:{
                list:list
            }
        })
    </script>
</body>
</html>